<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo $this->_tpl_vars['softtitle'] ?></title>
<link href="templates/css/baselist.css" rel="stylesheet" type="text/css" />
<link href="templates/css/all.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/control.js"></script>
<script type="text/javascript" language="JavaScript">
	var article_doc_add_win_js_mid_empty  = "<?php echo $this->_tpl_vars['ST']['article_doc_add_win_js_mid_empty'] ?>";
	var article_doc_add_win_js_lng_empty  = "<?php echo $this->_tpl_vars['ST']['article_doc_add_win_js_lng_empty'] ?>";
	var article_doc_text  = "<?php echo $this->_tpl_vars['ST']['article_doc_text'] ?>";
	var article_batdoc_text  = "<?php echo $this->_tpl_vars['ST']['article_batdoc_text'] ?>";
	$(window).load(function(){
		var h = $(window).height();
		$('#mainwindowhidden').css({height:h-39});
	});

	function onadd(){
		var lng=document.docadd.lng.value;
		var mid=document.docadd.mid.value;
		var type=document.docadd.type.value;
		if( lng=='') {
		    alert(article_doc_add_win_js_lng_empty);
		    document.docadd.lng.focus();
		    return false;
		}
		if( mid==0) {
		    alert(article_doc_add_win_js_mid_empty);
		    document.docadd.mid.focus();
		    return false;
		}
		var modeltitle=$("select[name=mid] option:selected").text();
		if (type==1){
			var title=modeltitle+article_batdoc_text;
			var loadurl='index.php?archive=article&action=docbatadd&tab=false&lng='+lng+'&mid='+mid+'&flacode='+Math.random();
		}else{
			var title=modeltitle+article_doc_text;
			var loadurl='index.php?archive=article&action=docadd&tab=false&lng='+lng+'&mid='+mid+'&flacode='+Math.random();
		}

		parent.onbotton(title,loadurl,true)
		parent.closeifram();
	}
</script>
<!--[if IE 6]>
<style type="text/css" media="screen"> 
body { behavior:url("templates/css/csshover.htc");} 
</style> 
<![endif]-->
</head>

<body class="bodyflow">
<div class="centerrightwindow">
	<form name="docadd" id="docadd" method="post" action="#body" onSubmit="return onadd()" >
	<input type="hidden" name="path" id="path" value="<?php echo $this->_tpl_vars['path'] ?>"/>
	<input type="hidden" name="type" id="type" value="<?php echo $this->_tpl_vars['type'] ?>"/>
	<div id="mainwindowhidden">
		<div class="suggestion">
			<span class="sugicon"><span class="strong colorgorning2"><?php echo $this->_tpl_vars['ST']['position_title'] ?></span><span class="padding-left5 colorgorningage"><?php echo $this->_tpl_vars['ST']['article_doc_add_win_mess'] ?></span></span>
		</div>
		<div class="sugtitle-line"></div>
		<div class="formdiv" id="filecheckmanger">
			<table border="0" width="100%">
				<tr class="trstyle2">
					<td width="20%" class="trtitle01"><?php echo $this->_tpl_vars['ST']['article_doc_add_win_lng'] ?></td>
					<td width="80%" class="trtitle02">
						<select size="1" name="lng" id="lng">
						<?php if (count($this->_tpl_vars['lnglist'])>0){$divid_list=1;for($list=0;$list<count($this->_tpl_vars['lnglist']); $list++){?>
							<option <?php echo $this->_tpl_vars['lnglist'][$list]['selected'] ?> value="<?php echo $this->_tpl_vars['lnglist'][$list]['lng'] ?>"><?php echo $this->_tpl_vars['lnglist'][$list]['lngtitle'] ?></option>
						<?php }} ?>
						</select>
						<span class="cautiontitle"><?php echo $this->_tpl_vars['ST']['article_doc_add_win_lng_mess'] ?></span>
					</td>
				</tr>
				<tr class="trstyle2">
					<td width="20%" class="trtitle01"><?php echo $this->_tpl_vars['ST']['article_doc_add_win_model'] ?></td>
					<td width="80%" class="trtitle02">
						<select size="1" name="mid" id="mid">
							<option value="0"><?php echo $this->_tpl_vars['ST']['typemanage_type_add_mid_option'] ?></option>
							<?php if (count($this->_tpl_vars['modelarray'])>0){$divid_list=1;for($list=0;$list<count($this->_tpl_vars['modelarray']); $list++){?>
							<option value="<?php echo $this->_tpl_vars['modelarray'][$list]['mid'] ?>"><?php echo $this->_tpl_vars['modelarray'][$list]['modelname'] ?></option>
							<?php }} ?>
						</select>
						<span class="cautiontitle"><?php echo $this->_tpl_vars['ST']['article_doc_add_win_model_mess'] ?></span>
					</td>
				</tr>
			</table>
		</div>
	</div>
	<div id="downbotton">
		<div id="subbotton">
			<table border="0" width="100%">
				<tr id="bottonsubmit">
					<td id="right"><input type="submit" name="Submit" id="submitbotton" value="<?php echo $this->_tpl_vars['ST']['botton_add_next'] ?>" class="buttonface" title="<?php echo $this->_tpl_vars['ST']['botton_add_next'] ?>"/></td>
					<td id="left" class="padding-left5"><input type="reset" name="reset" onClick="javascript:parent.closeifram();" id="release" value="<?php echo $this->_tpl_vars['ST']['botton_add_reset'] ?>" class="buttonface"  title="<?php echo $this->_tpl_vars['ST']['botton_add_reset'] ?>" /></td>
				</tr>
			</table>
		</div>
	</div>
	</form>
</div>
</body>
</html>